package cn.huibangbang.easyexcel.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;

import java.util.Date;

/**
 * @author zhang
 * @version 1.0
 * @description TODO
 * @date 2023/6/28 0028
 */
@Data
// @ColumnWidth(10) 列宽
@ContentRowHeight(20) // 内容行高
@HeadRowHeight(25)   // 表头行高
@ExcelIgnoreUnannotated // 不标注时。全部字段参与。标注后对添加了注解的字段参与
public class Student {
    /**
     * 姓名
     */
    @ColumnWidth(15)
    @ExcelProperty(value = {"学生信息表","姓名"}, index = 0)
    private String name;
    /**
     * 性别
     */
    @ExcelProperty(value = {"学生信息表","性别"}, index = 1)
    @ColumnWidth(10)
    private String gender;
    /**
     * 出生日期
     */
    @ExcelProperty(value = {"学生信息表","出生日期"}, index = 2)
    @ColumnWidth(20)
    private Date birthday;
    /**
     * id
     */
    @ExcelIgnore
    private String id;
}
